package com.ruoyi.search.controller;

import com.ruoyi.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.text.ParseException;
import java.util.Map;

@RestController
@RequestMapping("search")
public class SearchController {
    @Autowired
    SearchService searchService;

    @PostMapping("{page}/{size}")
    public Map search(@PathVariable Integer page,
                      @PathVariable Integer size,
                      @RequestBody Map searchMap) throws IOException, ParseException {
        return searchService.search(page,size,searchMap);
    }

    @PostMapping("/insert")
    public void insertcoupon(){

    }
}
